package com.jtlrm.ckd.mvp.view.adapter;

import android.widget.ImageView;

import com.base.sdk.util.ImageUtil;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jtlrm.ckd.R;
import com.jtlrm.ckd.entity.HuanZheInfoEntity;

public class HomeQueryHuanZheAdapter extends BaseQuickAdapter<HuanZheInfoEntity, BaseViewHolder> {

    public HomeQueryHuanZheAdapter() {
        super(R.layout.search_huanzhe_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, HuanZheInfoEntity item) {
        ImageUtil.loadCircleAvatarImage((ImageView) helper.getView(R.id.avatar), item.getHeadPicture());
        helper.setText(R.id.name, item.getName());
        helper.setText(R.id.sex, item.getSex());
        helper.setText(R.id.age, item.getAge() + "岁");
    }
}
